package com.wzcl.app.service.impl;

import com.wzcl.app.dao.model.OrderDetail;
import com.wzcl.app.dao.repository.OrderDetailRepository;
import com.wzcl.app.service.OrderDetailService;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;


@Log4j2
@Service
public class OrderDetailServiceImpl implements OrderDetailService {

    @Autowired
    private OrderDetailRepository orderDetailRepository;

    @Override
    public OrderDetail getOrderDetailById(Integer id) {
        Optional<OrderDetail> optional = orderDetailRepository.findById(id);
        return optional.orElse(null);
    }

}
